<HTML><HEAD><TITLE>EplexInstance:eplex_probe(+Probes, -Cost)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">library(eplex)</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>EplexInstance:eplex_probe(+Probes, -Cost)</H1>
Invoke EplexInstance's external solver, probing the problem temporarily modified by the probe specifications.
<DL>
<DT><EM>Probes</EM></DT>
<DD>Temporary probe specification(s)
</DD>
<DT><EM>Cost</EM></DT>
<DD>Value of solution
</DD>
</DL>
<H2>Description</H2>
<P>
   Similar to eplex_solve/1, but the problem is first temporarily modified
   as specified in Probes. Probes is a list of one or more probe
   specifications that specifies how the problem is modified. After the call
   to this predicate, the problem is restored for the external
   solver. However, the results from the probe (obtainable from
   eplex_var_get/3 and eplex_get/2) are retained.
</P><P>
   The following probe specifications are allowed:
<DL>
    <DT>min(Expr)/max(Expr)</DT><DD>
        Minimise/maximise the problem with the objective function Expr.
        Only existing problem variables can be given in Expr. Cannot be
        used in conjunction with objsense, objexpr or perturb_obj.</DD>
    <DT>objsense(Sense)</DT><DD>
        Sense is either min or max. Solves the problem with the original
        objective function, but with the sense given in Sense rather than
        that specified at setup. If only the sense of the objective is to 
        be changed, this changes the objective more efficiently than using
        min(Expr)/max(Expr). Cannot be used in conjunction with min/max.</DD>
    <DT>objexpr(Expr)</DT><DD>
        Optimise the problem with respect to the objective function Expr,
        without changing the optimisation direction specified at problem
        setup. Cannot be used in conjunction with min/max or perturb_obj.</DD>
    <DT>perturb_obj(ObjDeltas)</DT><DD>
        Perturb the existing linear objective coefficients as specified by
        ObjDeltas. ObjDeltas is a (possibly empty) list of specifications
        Var : Delta, where Var is a problem variable and Delta is the
        amount its existing objective coefficient should be changed by. For
        example, if the existing objective is 2*X + 3*Y + Z, 
        perturb_obj([X : 1, Y : -0.5]) will modify the objective to 
        3*X + 2.5*Y + Z for the probe. If a variable occurs more than once in
        ObjDeltas, the change to the objective coefficient is cumulative.
        Perturb_obj is not strictly needed, as its effect can be achieved
        by constructing the whole objective and then probing with that.
        However, this can be expensive if most of the objective stays 
        unchanged, with only a few of its coefficients changed. It is 
        recommended that perturb_obj probe be used in such cases. 
        Cannot be used in conjunction with objexpr or min/max.</DD>
    <DT>rhscoeffs(RhsCoeffs)</DT><DD>
        Alter the rhs coefficients of the matrix as specified by RhsCoeffs.
        RhsCoeffs is a (possibly empty) list of rhs coefficient
        specifications of the form Idx : Rhs, where Idx is the index of the
        expandable constraint obtained from using lp_add_constraints/4, and
        Rhs is the value for the right-hand side constant to use during the
        probe. Any constraints not specified in RhsCoeffs remain unchanged
        during the probe. If Idx occurs more than once in RhsCoeffs, the
        result is undefined.</DD>
    <DT>bounds(BoundsChanges)</DT><DD>
        Alter the bounds of problem variables as specified by
        BoundsChanges. BoundsChanges is a (possibly empty) list of bounds
        changes of the form Var $:: Lo..Hi, where Var is a problem variable
        and Lo and Hi are the new lower and upper bounds to use for the
        variable during the probe. Unlike normal bound changes, the bounds
        can be widened as well narrowed, although failure will still occur
        if Hi &lt; Lo. Variables not specified in BoundsChanges retain their
        bounds during the probe. If Var occurs more than once in 
        BoundsChanges, the result is undefined.</DD>
    <DT>fixed</DT><DD>
        The problem is solved as an LP problem by `fixing' the integer
        variables to their optimal MIP solution values. If there is an
        existing MIP solution for the problem, eplex will try to use that;
        otherwise, a MIP solution is obtained first.
        `Fixed' probing is useful for providing reduced costs for
        MIP problems. Note that reduced costs for the variables will only be
        available if the reduced_cost option for the problem is set to yes
        (this can be done either at problem setup, or by using
        eplex_set/2). For a problem without integer variables, the original
        problem is solved without change.  Note that this probe
        specification is not available if the mip_use_copy option is set to
        no for external solvers that cannot modify a MIP problem.  Cannot
        be used in conjunction with `relaxed'.</DD>
    <DT>relaxed</DT><DD>
        The problem is solved as an LP problem by relaxing all the integer
        constraints.  For a problem with integer variables, this should be
        equivalent to the initial relaxation solved at the start of the MIP
        search. Depending on the solver, the discreteness of the integer
        variables may still be taken into account during presolve. To
        ensure that the problem solved is exactly the LP problem without
        any integer constraints, presolve should be off. For a problem
        without integer variables, the original problem is solved without
        change. Note that this probe specification is not available if the
        mip_use_copy option is set to no for external solvers that cannot
        modify a MIP problem. Cannot be used in conjunction with `fixed'.</DD>

</DL>
</P>
<H3>Fail Conditions</H3>
External solver was unable to find a solution, or bounds probe used and the specified interval for some variable is empty
<H3>Exceptions</H3>
<DL>
<DT><EM>(5) type error </EM>
<DD>EplexInstance does not have a solver setup for it.
<DT><EM>(eplex_suboptimal) </EM>
<DD>Solution was found, but is possibly suboptimal
<DT><EM>(eplex_unbounded) </EM>
<DD>Problem is unbounded, no solution values
<DT><EM>(eplex_unknown) </EM>
<DD>Result is unknown (infeasible or unbounded)
<DT><EM>(eplex_abort) </EM>
<DD>External solver aborted for some reason
<DT><EM>(abort) </EM>
<DD>Incorrect specification for the probe(s)
<DT><EM>(6) out of range </EM>
<DD>mip_use_copy option was set to no (solver dependent) for probes that require yes.
<DT><EM>(40) stale object handle </EM>
<DD>Solver state had been previously destroyed.
</DL>
<H2>See Also</H2>
<A HREF="../../lib/eplex/eplex_solve-1.html">eplex_solve / 1</A>, <A HREF="../../lib/eplex/eplex_solver_setup-1.html">eplex_solver_setup / 1</A>, <A HREF="../../lib/eplex/eplex_solver_setup-4.html">eplex_solver_setup / 4</A>, <A HREF="../../lib/eplex/eplex_get-2.html">eplex_get / 2</A>, <A HREF="../../lib/eplex/eplex_var_get-3.html">eplex_var_get / 3</A>, <A HREF="../../lib/eplex/eplex_set-2.html">eplex_set / 2</A>, <A HREF="../../lib/eplex/lp_add_constraints-4.html">lp_add_constraints / 4</A>
</BODY></HTML>
